<?php

class ControllerWpCategory extends Controller
{
    private $error = array();

    public function getList()
    {
        $this->load->model('wp/category');
        if (! $this->actionCheck(true, false)) {
            return;
        }
        
		
		$data = $this->model_wp_category->getList($this->customer->getId());
		
		$this->response->setOK( $data);
    }
	
	public function getMyCategoryList()
    {
        $this->load->model('wp/category');
        if (! $this->actionCheck(true, false)) {
            return;
        }
        
		
		$data = $this->model_wp_category->getMyCategoryList($this->customer->getId());
		
		$this->response->setOK( $data);
    }

	public function bind()
    {
        $this->load->model('wp/category');
        if (! $this->actionCheck(true, true)) {
            return;
        }
        
		$this->model_wp_category->bind($this->customer->getId(),explode(",",$this->request->post['categories']));
		$this->response->setOK();
		
    }

}